//
//  FTYUser.h
//  RedWine
//
//  Created by Liufangfang on 2017/1/9.
//  Copyright © 2017年 HuiBangKe. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ShopCartModel.h"

#define USERSUCCESSFUL @"UserSuccessful"
#define USERID @"UserId"
#define USERTOKEN @"UserToken"
#define USERPHONENUM @"UserPhoneNum"
#define USERNAME @"UserName"
#define USERSEX @"UserSex"
#define USERHEADIMGURL @"UserHeadImgUrl"
#define UserAccountBalance @"UserAccountBalance"
#define UserWineBalance @"UserWineBalance"
#define UserBenefit @"UserBenefit"
#define UserShopCart @"UserShopCart"


@interface FTYUser : NSObject

@property (nonatomic, assign) BOOL isLogin;
@property (nonatomic, copy) NSString *userID;
@property (nonatomic, copy) NSString *userToken;
@property (nonatomic, copy) NSString *userPhoneNumber;
@property (nonatomic, copy) NSString *userName;
@property (nonatomic, copy) NSString *userSex;
@property (nonatomic, copy) NSString *userAvatar;
//账户余额
@property (nonatomic, copy) NSString *userAccountBalance;
//酒券余额
@property (nonatomic, copy) NSString *userWineBalance;
//累计收益
@property (nonatomic, copy) NSString *userBenefit;

+ (instancetype)sharedUser;

- (void)writeUserIsLogin:(BOOL)isLogin;
- (void)writeUserID:(NSString *)userID;
- (void)writeUserToken:(NSString *)userToken;
- (void)writeUserPhoneNumber:(NSString *)userPhoneNumber;
- (void)writeUserName:(NSString *)userName;
- (void)writeUserSex:(NSString *)userSex;
- (void)writeUserAvatar:(NSString *)userAvatar;
- (void)writeUserAccountBalance:(NSString *)userAccountBalance;
- (void)writeUserWineBalance:(NSString *)userWineBalance;
- (void)writeUserBenefit:(NSString *)userBenefit;
- (void)writeUserShopCart:(ShopCartModel *)shopCart;


- (BOOL)isLogin;
- (NSString *)userID;
- (NSString *)userToken;
- (NSString *)userPhoneNumber;
- (NSString *)userName;
- (NSString *)userSex;
- (NSString *)userAvatar;
- (NSString *)userAccountBalance;
- (NSString *)userWineBalance;
- (NSString *)userBenefit;
- (ShopCartModel *)userShopCartByGoodsId:(NSString *)goodsId;

- (void)userLogOut;

@end
